package com.dinim.object;

import com.dinim.matrix.twodimensional.IPoint2D;

public class Point2D implements IPoint2D{

    private double x;
    private double y;
    
    public Point2D(double x, double y) {
        this.x = x;
        this.y = y;
    }
    
    public Point2D(IPoint2D p){
        this.x = p.getX();
        this.y = p.getY();
    }
    
    public double getX() {
        return x;
    }
    
    public void setX(double x) {
        this.x = x;
    }
    
    public double getY() {
        return y;
    }
    
    public void setY(double y) {
        this.y = y;
    }

    public Object clone(){
        return new Point2D(x, y);
    }
    
}
